package com.zhentao.api.user;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.pojo.users.Users;
import com.zhentao.model.common.pojo.users.param.UserBalanceParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName: UserApi
 * @Author: muhaoyang1
 * @Date: 2024/12/18 19:43
 * @Comment:
 */
@FeignClient(value = "user-service")
public interface UserApi {
    @GetMapping("/user/user/id")
    public ResponseResult selectbyid();

    @GetMapping("/user/user/getUserInfo")
    public Users getUserInfo(@RequestParam("userId") Long userId);

    @PostMapping("/auth/user/update/balance")
    /**
     * @description: 修改用户余额
     * @author: muhaoyang
     * @date: 2024/12/26 21:16
     * @param: [userBalanceParam]
     * @return: com.zhentao.model.common.dtos.ResponseResult
     **/
    public ResponseResult updateBalance(@RequestBody UserBalanceParam userBalanceParam);

    @PostMapping("/auth/user/update/ponit")
    /**
     * @description:修改用户积分
     * @author: muhaoyang
     * @date: 2025/1/4 20:04
     * @param: [userBalanceParam]
     * @return: com.zhentao.model.common.dtos.ResponseResult
     **/
    public ResponseResult updatePonit(@RequestBody UserBalanceParam userBalanceParam);
}
